Conventionally, there is a program which causes an operational object, which is operated by a user in accordance with a user's input to an input device operable to designate a position on a screen of a display device, to perform a predetermined motion. For example, in a game described in non-patent document 1 (“The Legend of Zelda: Phantom Hourglass, operating instructions”, Nintendo Co., Ltd., Jun. 23, 2007, p. 14-17), in a case where a first operation (operation of drawing a circle) is performed onto an input device, the operational object performs a first motion (forward rolls). On the other hand, in a case where a second operation (touch operation) is performed onto the input device, the operational object performs a second motion (lock-on slash) against a predetermined object (enemy).
However, in the program described in non-patent document 1, for example, when a user intends to cause the operational object to perform the second motion and performs the second operation while the above-mentioned predetermined object is moving, there may be a case where the first motion is performed. Accordingly, in the program described in non-patent document 1, there is room for improvement in terms of causing the operational object to perform a motion as intended by a user.
Therefore, an object in certain example embodiments provide a computer-readable storage medium having stored therein an object control program which allows an object operated by a user to perform a motion intended by a user and an apparatus operable to execute the same.
Certain example embodiments have following features to attain the object mentioned above.
One embodiment is directed to a computer-readable storage medium having stored therein an object control program executed by a computer in an object control apparatus for controlling an operational object in a virtual space, the operational object operated in accordance with a user's input to an input device operable to designate a position on a screen of a display device. The object control program causes the above-mentioned computer to function as: position detection means, area setting means, area holding means, motion control means, and area determination means. The position detection means detects, based on an output signal from the above-mentioned input device, a position on the above-mentioned screen, which is designated by a user. The area setting means sets a predetermined area in a position of a predetermined object in the virtual space, which is different from the above-mentioned operational object. The area holding means holds the predetermined area set by the above-mentioned area setting means until a predetermined hold period has elapsed. The motion control means detects, based on an output signal from the above-mentioned input device, a first operation onto the above-mentioned screen and causes the above-mentioned operational object to perform a first motion in accordance with the first operation. The area determination means determines whether or not the position detected by the above-mentioned position detection means is present in the predetermined area held by the above-mentioned area holding means. The above-mentioned area holding means holds, even in a case where the above-mentioned predetermined object has moved in the above-mentioned virtual space, the above-mentioned predetermined area at a position where the predetermined object has been present before movement. And the above-mentioned motion control means prohibits the above-mentioned operational object from performing the above-mentioned first motion when a determination result made by the above-mentioned area determination means is positive even in a case where the above-mentioned first operation is performed.
The above-mentioned predetermined object may be an object operated by another user different from the above-mentioned user and be an object controlled by the object control apparatus.
As described above, the predetermined area is set in the position of the predetermined object and is held for the predetermined hold period. Even in the case where the predetermined object has moved, the predetermined area is held in the position where the predetermined object has been present before the movement. When the position detected by the position detection means is present in the above-mentioned predetermined area, the above-mentioned operational object is caused not to perform the first motion even in the case where the first operation is performed. This allows the operational object to be prohibited from performing a motion which a user does not intend.
In one embodiment, the above-mentioned area setting means may set the above-mentioned predetermined area based on an output signal from the input device when a user's designation to the predetermined object is detected.
As described above, when the above-mentioned predetermined object is designated by a user, the above-mentioned predetermined area can be set.
In one embodiment, the above-mentioned motion control means may cause the above-mentioned operational object to perform a second motion different from the above-mentioned first motion when the determination result made by the above-mentioned area determination means is positive.
As described above, the above-mentioned operational object can be caused to perform the second motion, instead of the above-mentioned first motion.
In one embodiment, the above-mentioned motion control means may detect the first operation or a second operation different from the first operation onto the above-mentioned screen based on an output signal from the above-mentioned input device. In this case, when the determination result made by the above-mentioned area determination means is positive, the above-mentioned motion control means may cause the above-mentioned operational object to perform the above-mentioned second motion in accordance with the above-mentioned first operation or the above-mentioned second operation.
As described above, when the position designated by a user is present in the above-mentioned predetermined area, the above-mentioned operational object can be caused to perform the second motion in accordance with the above-mentioned first operation or the above-mentioned second operation.
In one embodiment, when the determination result made by the above-mentioned area determination means is negative, the above-mentioned motion control means may cause the above-mentioned operational object to perform the first motion in accordance with the above-mentioned first operation.
As described above, when the position detected by the above-mentioned position detection means is not present in the above-mentioned predetermined area, the above-mentioned operational object can be caused to perform the first motion. This can cause the operational object to perform a motion which a user intends.
In one embodiment, the above-mentioned motion control means may detect the above-mentioned first operation when a predetermined operation onto the above-mentioned input device is repeatedly detected for a predetermined detection period.
As described above, when the predetermined operation onto the above-mentioned input device is repeatedly detected for the predetermined detection period, the above-mentioned first operation can be detected. For example, when a double-touch operation onto the input device such as a touch panel is detected, the above-mentioned first operation can be detected.
In one embodiment, the above-mentioned hold period may be longer than the above-mentioned detection period.
As described above, the above-mentioned hold period can be made longer than the above-mentioned detection period. In other words, a period for which the above-mentioned predetermined area is held can to be made longer than a period for which the above-mentioned predetermined operation is detected. This allows, for example, the period for which the above-mentioned predetermined area is held can be made longer than a detection period for which the double-touch is detected and can cause the above-mentioned operational object to perform a motion which a user intends.
In one embodiment, when the above-mentioned predetermined object has moved in the above-mentioned virtual space, the above-mentioned area holding means may move the above-mentioned predetermined area in accordance with the movement of the predetermined object. In this case, the above-mentioned area determination means determines whether or not a position detected by the above-mentioned position detection means is present in any of either an area into which the predetermined area has been moved by the above-mentioned area holding means or an area where the predetermined area has been held by the above-mentioned area holding means.
As described above, the above-mentioned predetermined area can be moved in conjunction with the movement of the above-mentioned predetermined object and the above-mentioned predetermined area can be also held at the position where the above-mentioned predetermined object has been present before the movement. It can be determined whether or not the position designated by a user is present in any of either the predetermined area into which the predetermined area has been moved or the area in which the predetermined area has been held.
In one embodiment, when a positional relationship between the above-mentioned operational object and the above-mentioned predetermined object satisfies a predetermined condition, the above-mentioned area setting means may set no said predetermined area.
As described above, the above-mentioned predetermined area can be set in accordance with the above-mentioned positional relationship.
In one embodiment, when through the movement of the above-mentioned operational object and/or the above-mentioned predetermined object, a positional relationship between the above-mentioned operational object and the above-mentioned predetermined object comes to satisfy a predetermined condition, the above-mentioned area setting means may cause the above-mentioned predetermined area to disappear.
As described above, when the movement of the object causes the positional relationship between the above-mentioned operational object and the above-mentioned predetermined object to satisfy the predetermined condition, the above-mentioned predetermined area can be caused to disappear.
In one embodiment, when a third object different from the above-mentioned operational object and from the above-mentioned predetermined object comes to be present between the above-mentioned operational object and the above-mentioned predetermined object, the above-mentioned area setting means may cause the above-mentioned predetermined area to disappear.
As described above, when the movement of the above-mentioned operational object or the above-mentioned predetermined object causes the third object to come to be present between the above-mentioned operational object and the above-mentioned predetermined object, the above-mentioned predetermined area can be caused to disappear.
In one embodiment, the above-mentioned area setting means may set the above-mentioned hold period in accordance with a kind of the above-mentioned predetermined object.
As described above, the period for which the above-mentioned predetermined area is held can be set in accordance with the kind of the object. For example, the above-mentioned predetermined period for an object whose movement velocity is fast can be set to be short.
In one embodiment, the above-mentioned computer may be further caused to function as movement control means for automatically moving the above-mentioned predetermined object.
As described above, the above-mentioned predetermined object can be automatically moved.
In one embodiment, the above-mentioned first motion may be a non-attack motion which the above-mentioned operational object is caused to perform, and the above-mentioned second motion may be an attack motion against the above-mentioned predetermined object, which the above-mentioned operational object is caused to perform.
As described above, the above-mentioned operational object can be caused to perform the non-attack motion and the attack motion.
In one embodiment, the above-mentioned area setting means may set a shape of the predetermined area, a size of the predetermined area, or a number of the predetermined areas in accordance with a kind of the predetermined object.
As described above, the shape, number, or size of the above-mentioned predetermined area can be set in accordance with the kind of the above-mentioned predetermined object.
One embodiment is directed to a computer-readable storage medium having stored therein an object control program executed by a computer in an object control apparatus for controlling an operational object in a virtual space, the operational object operated in accordance with a user's input to an input device operable to designate a position on a screen of a display device. The object control program causes the above-mentioned computer to function as: position detection means, area setting means, area holding means, area determination means, and motion control means. The position detection means detects, based on an output signal from the above-mentioned input device, a position on the above-mentioned screen, which is designated by a user. The area setting means sets a predetermined area in a position of a predetermined object in the above-mentioned virtual space, which is different from the above-mentioned operational object. The area holding means holds the predetermined area set by the area setting means until a predetermined hold period has elapsed. The area determination means determines whether or not the position detected by the above-mentioned position detection means is present in the predetermined area held by the above-mentioned area holding means. When a determination result made by the above-mentioned area determination means is positive, the motion control means causes the above-mentioned operational object to perform a first motion in accordance with a predetermined operation onto the above-mentioned input device. In this case, the area holding means holds, even in a case where the above-mentioned predetermined object has moved in the above-mentioned virtual space, the above-mentioned predetermined area at a position where the predetermined object has been present before movement.
As described above, the predetermined area is set for the predetermined object and held for the predetermined hold period. When the above-mentioned predetermined object has moved, the above-mentioned predetermined area is held at the position where the predetermined object has been present before the movement. When the position detected by the position detection means is present in the area being held, the operational object can be caused to perform the first motion. This can cause the operational object to perform a motion which a user intends even in the case where the predetermined object has moved.
One embodiment may be implemented in a form of an object control apparatus for executing the above-mentioned object control program.
According to certain example embodiments, an object operated by a user can be caused to perform a motion which a user intends.
These and other objects, features, aspects and advantages of certain example embodiments will become more apparent from the following detailed description when taken in conjunction with the accompanying drawings.